package com.lmx.tour_management_system.mapper;

import com.lmx.tour_management_system.pojo.Comments;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author lmx
 * @since 2021-01-25
 */
public interface CommentsMapper extends BaseMapper<Comments> {

    @Select("select account_tourist.account_username,comment_text,create_time from account_tourist,comments WHERE tourist_id = account_id ORDER BY create_time desc")
    List<Map<String,String>> queryAllComments();

}
